package com.example.yuejian.yuejian.bean;

import com.google.gson.Gson;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by Administrator on 2017/9/14.
 */

public class Register {


    /**
     * retCode : 0
     * retMsg : 用户已经存在
     */

    private int retCode;
    private String retMsg;

    public static Register objectFromData(String str, String key) {

        try {
            JSONObject jsonObject = new JSONObject(str);

            return new Gson().fromJson(jsonObject.getString(str), Register.class);
        } catch (JSONException e) {
            e.printStackTrace();
        }

        return null;
    }

    public void setRetCode(int retCode) {
        this.retCode = retCode;
    }

    public void setRetMsg(String retMsg) {
        this.retMsg = retMsg;
    }

    public int getRetCode() {
        return retCode;
    }

    public String getRetMsg() {
        return retMsg;
    }
}
